home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / RTCPlugin.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  122 lines

  1. {
  2.      File:        RTCPlugin.p
  3.  
  4.      Contains:    System interface for RTC plugins
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT RTCPlugin;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __RTCPLUGIN__}
  28. {$SETC __RTCPLUGIN__ := 1}
  29.  
  30. {$I+}
  31. {$SETC RTCPluginIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  38. {$IFC UNDEFINED __TIMING__}
  39. {$I Timing.p}
  40. {$ENDC}
  41. {$ENDC}
  42.  
  43. {$PUSH}
  44. {$ALIGN MAC68K}
  45. {$LibExport+}
  46.  
  47. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  48. {
  49. ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
  50.     status codes
  51. ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
  52. }
  53.  
  54. CONST
  55.     kRTCPluginVersionOne        = $01;
  56.     kRTCPluginCurrentVersion    = $01;
  57.  
  58.     kRTCNoError                    = 0;
  59.     kRTCTimeout                    = 1;
  60.     kRTCUnexpectedError            = 2;
  61.     kRTCMemoryError                = 3;
  62.     kRTCParameterError            = 4;
  63.     kRTCDeviceError                = 5;
  64.     kRTCUnexpectedDeviceRequest    = 6;
  65.     kRTCControllerError            = 7;
  66.     kRTCConsistencyCheckError    = 8;
  67.  
  68. {
  69. ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
  70.     Plugin Calls Provided by the Plugin
  71. ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
  72.  All plugin calls are async.
  73.  The plugin starts the i/o and returns immediately.
  74.  The plugin ISR calls RTCFamRequestComplete() when
  75.  the i/o is completed (see below).
  76. }
  77.  
  78. TYPE
  79.     RTCPluginHWVerifyPtr = ProcPtr;  { FUNCTION RTCPluginHWVerifyPtr: OSStatus; C; }
  80.  
  81.     RTCPluginInitPtr = ProcPtr;  { FUNCTION RTCPluginInitPtr: OSStatus; C; }
  82.  
  83.     RTCPluginTermPtr = ProcPtr;  { FUNCTION RTCPluginTermPtr: OSStatus; C; }
  84.  
  85.     RTCPluginSetPtr = ProcPtr;  { FUNCTION RTCPluginSetPtr(newTime: Nanoseconds): OSStatus; C; }
  86.  
  87.     RTCPluginGetPtr = ProcPtr;  { FUNCTION RTCPluginGetPtr(VAR currentTime: Nanoseconds): OSStatus; C; }
  88.  
  89.     RTCPluginDispatchTablePtr = ^RTCPluginDispatchTable;
  90.     RTCPluginDispatchTable = RECORD
  91.         version:                UInt32;
  92.         reserved:                ARRAY [0..2] OF UInt32;
  93.         Verify:                    RTCPluginHWVerifyPtr;
  94.         Init:                    RTCPluginInitPtr;
  95.         Term:                    RTCPluginTermPtr;
  96.         Read:                    RTCPluginGetPtr;
  97.         Write:                    RTCPluginSetPtr;
  98.     END;
  99.  
  100. FUNCTION RTCPluginHWVerify: OSStatus; C;
  101. FUNCTION RTCPluginInit: OSStatus; C;
  102. FUNCTION RTCPluginTerm: OSStatus; C;
  103. FUNCTION RTCPluginSet(newTime: Nanoseconds): OSStatus; C;
  104. FUNCTION RTCPluginGet(VAR currentTime: Nanoseconds): OSStatus; C;
  105. {
  106. ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
  107.     Plugin Calls Provided by the Family
  108. ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
  109. }
  110. PROCEDURE RTCFamRequestComplete(status: OSStatus); C;
  111. {$ENDC}
  112. {$ALIGN RESET}
  113. {$POP}
  114.  
  115. {$SETC UsingIncludes := RTCPluginIncludes}
  116.  
  117. {$ENDC} {__RTCPLUGIN__}
  118.  
  119. {$IFC NOT UsingIncludes}
  120.  END.
  121. {$ENDC}
  122.